home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
The World of Computer Software.iso
/
vga2eps.zip
/
EPSPATCH.DOC
< prev
next >
Wrap
Text File
|
1992-04-15
|
3KB
|
72 lines
15-04-1992
EPSPATCH
========
A program to modify the contents of an EPS file produced by VGA2EPS
Author:
Alpo Värri, DSP Lab., Tampere University of Technology, Finland.
Purpose:
The purpose of EPSPATCH is to provide a (crude) way to edit the contents
of the EPS screen dump captured with VGA2EPS. The editing is implemented
by letting the user to apply a patch image on top of the original one to
the location of choice.
Operation and usage:
The EPS files produced by VGA2EPS consist of a header, a small number of
PostScript commands, the image encoded in hex format, and a small trailer.
The hex image is organized as a matrix of 160 columns (each column
representing four pixels) and 350 (640x350 image) or 480 (640x480 image)
lines. The hex codes 0, 1,..., 9, A,..., F contain the pixel information
in such a way that if the bit is not set, a pixel will be plotted on
paper, i.e. 0 means a four pixels wide black horizontal line and F
means that none of these pixels is printed. EPSPATCH reads the original
input file and the patch file containing the new hex values, overwrites
the image with the patch beginning from the line and column specified by
the user, and writes the result to a new output file.
The command format is
EPSPATCH FILEIN PATCHIN FILEOUT LINE COLUMN
where FILEIN is the EPS input file
PATCHIN is the EPS patch to be applied
FILEOUT is the output EPS file
LINE is the first EPS line to be patched (1-480)
COLUMN is the first EPS column to be patched (1-160)
Application notes:
Three example patch files are included in the archive. The file BOX.PTC
draws a 16x16 pixels wide black box. LINE.PTC draws a black horizontal
line. POINTER.PTC draws a black pointer (like the mouse cursor in
graphics mode) on a white background. The pointer patch was obtained
from an EPS file made by VGA2EPS with the help of the SNIPPER utility
published originally in PC Magazine and now available in SIMTEL20
and other well equipped FTP sites. EPSPATCH was used to insert the
text parts to the image AUTHOR.EPS. You may test the patches, for
example, by giving the commands
EPSPATCH AUTHOR.EPS LINE.EPS AUTHOR2.EPS 1 1
EPSPATCH AUTHOR2.EPS LINE.EPS AUTHOR3.EPS 480 1
and by directing the file AUTHOR2.EPS to your PostScript printer. The
image should now have a horizontal line on the first and last line of
the image.
EPSPATCH assumes that the those lines which are longer than 68 characters
belong to the hex image in the input EPS file. If you write your own
comments to the EPS file which are longer than 68 characters, the output
of EPSPATCH is probably not exactly what you wanted. If other characters
than the above mentioned hex characters are present in the patch file,
the PostScript interpreter of the laser printer will reject the page.